<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        #box{width: 200px;height: 200px;background: red}
    </style>
</head>
<body>
    <div id="box"></div>
</body>
<script>
    // js中的id选择器
    var box = document.getElementById("box");

    box.ondblclick = function(){
        console.log("dblclick")
    }
    box.onclick = function(){
        console.log("click")
    }
    box.onmouseover = function(){
        console.log("mouseover")
    }
    box.onmouseout = function(){
        console.log("mouseout")
    }
    box.onmousedown = function(){
        console.log("mousedown")
    }
    box.onmouseup = function(){
        console.log("mouseup")
    }

</script>
</html>